﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BigPixels
{
    public partial class CustomGridForm : Form
    {
        public int GridSize { get; set; }

        public CustomGridForm()
        {
            InitializeComponent();

            this.GridSize = 64;
        }

        private void CustomGridForm_Load(object sender, EventArgs e)
        {
            this.textBox1.Text = this.GridSize.ToString();
        }

        private void CustomGridForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                this.GridSize = Convert.ToInt32(this.textBox1.Text);
            }
            catch
            {
                e.Cancel = true;
            }
        }


    }
}
